package com.openbravo.bean.crm.contract;

import java.util.Date;

import com.openbravo.bean.Product;
import com.openbravo.bean.ref.I_RefProduct;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_ModifiedLogBean;

public class ContractProduct implements I_ModifiedLogBean<String>,I_AutoGeneratorStringKey,I_RefProduct{
	/**
	 * 
	 */
	private static final long serialVersionUID = -2160196772273824111L;
	private String id;
	private String customerId;
	private String productId;
	private double contractPrice;//约定价
	private double maxPrice;//最高价
	private  double minPrice;
	private int  state=STATE_Sale;//品态(停购
	private int distributionMode=DISTRIBUTIONMODE_purchase;//经销方式(进销，代销
	private  Date contractValidityDate;//合同有效期
	private Date lastModified;
    private Product refProduct;
	
    public static int STATE_Sale=0;
    public static int STATE_noSale=1;
    
    public static int DISTRIBUTIONMODE_purchase=0;
    public static int DISTRIBUTIONMODE_dealer=1;
    public static int DISTRIBUTIONMODE_lease=2;
    
	@Override
	public String getKey() {
		return id;
	}
	@Override
	public void setKey(String key) {
		this.id=key;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCustomerId() {
		return customerId;
	}
	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}
	public String getProductId() {
		return productId;
	}
	public void setProductId(String productId) {
		this.productId = productId;
	}
	public double getContractPrice() {
		return contractPrice;
	}
	public void setContractPrice(double contractPrice) {
		this.contractPrice = contractPrice;
	}
	public double getMaxPrice() {
		return maxPrice;
	}
	public void setMaxPrice(double maxPrice) {
		this.maxPrice = maxPrice;
	}
	public double getMinPrice() {
		return minPrice;
	}
	public void setMinPrice(double minPrice) {
		this.minPrice = minPrice;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public int getDistributionMode() {
		return distributionMode;
	}
	public void setDistributionMode(int distributionMode) {
		this.distributionMode = distributionMode;
	}
	public Date getContractValidityDate() {
		return contractValidityDate;
	}
	public void setContractValidityDate(Date contractValidityDate) {
		this.contractValidityDate = contractValidityDate;
	}
	
	@Override
	public Date getLastModified() {
		return lastModified;
	}
	
	@Override
	public void setLastModified(Date lastModified) {
		this.lastModified=lastModified;
	}
	@Override
	public Product getIncludeProduct() {
		return this.refProduct;
	}
	@Override
	public void setIncludeProduct(Product includeProduct) {
		this.refProduct=includeProduct;
	}
	@Override
	public void setProductID(String productId) {
	    this.productId=productId;
	}

}
